package com.blue.starter.core;

import java.io.Serializable;

/**
 * @Author : CaiYang
 * @Date : 2025-03-20 17:48
 * @Description :
 */
public class AjaxResult<T> implements Serializable {
    private T data;
    private String msg;
    private String code;

    // 添加无参构造函数
    public AjaxResult() {
    }

    public AjaxResult(String msg, String code) {
        this.code = code;
        this.msg = msg;
    }

    public AjaxResult(String msg, String code, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    // 添加公共的 Getter 方法
    public T getData() {
        return data;
    }

    public String getMsg() {
        return msg;
    }

    public String getCode() {
        return code;
    }
}